package br.com.sipsoft.svola.entidades;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="TBTIPO_REGISTRO_MANAD", uniqueConstraints = 
		 @UniqueConstraint(columnNames = {"TIPO_REGISTRO_MANAD","VERSAO"}))

public class ManadTipoRegistro extends BaseEntity {

	@Id
	@Column(name="TIPO_REGISTRO_MANAD_ID")
	@SequenceGenerator(name="TIPO_REGISTRO_MANAD_SEQ", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private @Getter @Setter Long id;
	
	@Column(name="TIPO_REGISTRO_MANAD")
	private @Getter @Setter String tipoRegistroManad;
	
	@Column(name="VERSAO")
	private @Getter @Setter String versao;
	
	@Column(name="DESCRICAO")
	private @Getter @Setter String descricao;
	
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "manadTipoRegistro")
	private @Getter @Setter List<ManadK050> listaManadK050;

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "manadTipoRegistro")
	private @Getter @Setter List<ManadK250> listaManadK250;
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "manadTipoRegistro")
	private @Getter @Setter List<ManadK300> listaManadK300;
	
}
